<template>
	<view class="content">
		<view class="section-0">
			<view class="section-body">
				<view class="tab">
					<view  @click="setCurIdx(idx, item.id)" :class="`item ${curIdx === idx ? 'item__active' : ''} ${curIdx + 1 === idx ? 'item__active_next' : ''}`" v-for="(item, idx) in tabList" :key="item.id">
						<view class="label">{{item.name}}</view>
						<view class="shape">
							<view class="shape-body"></view>
						</view>
						<view class="shape shape-mirrow">
							<view class="shape-body"></view>
						</view>
					</view>
				</view>
				<view class="list">
					<view :class="`item ${item.disabled ? 'item__disabled' : ''} ${item.time ? '' : 'item__notime'}`" v-for="item in list[curId]" :key="item.name">
						<view class="left">
							<view class="name">{{item.name}}</view>
							<view class="time" v-if="item.time">评审时间：<text>{{item.time}}</text></view>
						</view>
						<view class="right">
							<text class="iconfont icon-xiangyou1"></text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList: [
					{ id: 1, name: '项目前期'},
					{ id: 2, name: '工程前期'},
					{ id: 3, name: '建设施工'},
					{ id: 4, name: '启动验收'},
					{ id: 5, name: '总结评价'},
				],
				curIdx: 0,
				curId: 1,
				list: {
					1: [
						{name: '核对可研'},
						{name: '核准文件'},
						{name: '核对年度计划'},
						{name: '可研设计和评审进度'},
					],
					2: [
						{name: '任务计划书'},
						{name: '初步评审'},
						{name: '物资采购计划', disabled: true},
						{name: '政处对接', disabled: true},
						{name: '项目清单', disabled: true},
						{name: '四通一平', disabled: true},
						{name: '录入人员', disabled: true},
						{name: '合同管理', disabled: true},
					],
					3: [
						{name: '综合管理', disabled: true},
						{name: '进度管理'},
						{name: '安全管理', },
						{name: '质量管理', disabled: true},
						{name: '物资管理', disabled: true},
						{name: '技术管理', disabled: true},
						{name: '造价管理', disabled: true},
					],
					4: [
						{name: '启动会', disabled: true},
						{name: '设备增资', disabled: true},
					],
					5: [
						{name: '尾工管理', disabled: true},
						{name: '竣工图纸', disabled: true},
						{name: '工程结算', disabled: true},
						{name: '竣工决算审计', disabled: true},
						{name: '项目关闭', disabled: true},
						{name: '工程创优', disabled: true},
					]
				}
			}
		},
		methods: {
			setCurIdx(idx, id) {
				this.curIdx = idx;
				this.curId = id;
			},
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fafbfd;
	}
	.section-0{
		width: 100%;
		background-color: #3759f2;
		.section-body{
			width: 100%;
			border-top-left-radius: 40rpx;
			border-top-right-radius: 40rpx;
			background-color: #1534ce;
			overflow: hidden;
			.tab{
				width: 100%;
				height: 80rpx;
				@include clear();
				background-color: #1534ce;
				.item{
					width: 20%;
					float: left;
					height: 80rpx;
					background-color: #1534ce;
					position: relative;
					.label{
						height: 80rpx;
						line-height: 80rpx;
						position: relative;
						z-index: 10;
						box-sizing: border-box;
						text-align: center;
						width: 100%;
						font-size: 26rpx;
						font-weight: normal;
						font-stretch: normal;
						letter-spacing: 0rpx;
						color: #ffffff;
					}
					.shape{
						z-index: 1;
						width: 50rpx;
						height: 50rpx;
						position: absolute;
						bottom: 0;
						left: -50rpx;
						background: #000;
						display: none;
						background-color: #fafbfd;
						overflow: hidden;
						.shape-body{
							width: 50rpx;
							height: 50rpx;
							background-color: #1534ce;
							border-bottom-right-radius: 40rpx;
						}
					}
					.shape-mirrow{
						z-index: 1;
						left: 0;
						display: none;
						.shape-body{
							border-bottom-right-radius: 0rpx;
							border-bottom-left-radius: 40rpx;
						}
					}
				}
				.item__active{
					border-top-left-radius: 40rpx;
					border-top-right-radius: 40rpx;
					background-color: #fafbfd;
					.label{
						color: #46464a;
					}
					.shape{
						display: block;
					}
					.shape-mirrow{
						display: none;
					}
				}
				.item__active_next{
					border-bottom-right-radius: 50rpx;
					.shape{
						display: none;
					}
					.shape-mirrow{
						display: block;
					}
				}
			}
			.list{
				padding-top: 30rpx;
				padding-left: 27rpx;
				padding-right: 27rpx;
				padding-bottom: 30rpx;
				box-sizing: border-box;
				background-color: #fafbfd;
				display: flex;
				justify-content: space-between;
				flex-wrap: wrap;
				.item{
					width: 340rpx;
					height: 130rpx;
					background-color: #ffffff;
					border-radius: 35rpx;
					box-shadow: 0 0 20rpx 10rpx rgba(#bcbcb5, 0.17);
					box-sizing: border-box;
					padding: 30rpx;
					@include clear();
					margin-bottom: 23rpx;
					.left{
						float: left;
						width: 260rpx;
						.name{
							height: 30rpx;
							width: 100%;
							font-size: 26rpx;
							font-weight: bold;
							font-stretch: normal;
							line-height: 34rpx;
							letter-spacing: 0rpx;
							color: #46464a;
						}
						.time{
							width: 100%;
							padding-top: 17rpx;
							font-size: 16rpx;
							font-weight: normal;
							font-stretch: normal;
							letter-spacing: 0rpx;
							color: #7f98ae;
						}
					}
					.right{
						width: 20rpx;
						float: left;
						height: 70rpx;
						line-height: 70rpx;
						color: #3b3c40;
						.iconfont{
							font-size: 32rpx;
						}
					}
				}
				.item__notime{
					height: 90rpx;
					.left{
						.name{
							height: 30rpx;
							line-height: 30rpx;
						}
						.time{
							display: none;
						}
					}
					.right{
						height: 30rpx;
						line-height: 30rpx;
					}
				}
				.item__disabled{
					.left{
						opacity: 0.25;
					}
					.right{
						opacity: 0.25;
					}
				}
			}
		}
	}
</style>
